home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5318 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Another Character String Question
  5. Date: 10 Feb 1996 00:37:11 GMT
  6. Organization: OpenVision
  7. Message-ID: <4fgpbn$r4r@spanky.pls.ov.com>
  8. References: <4fdfq4$mis@er5.rutgers.edu>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article mis@er5.rutgers.edu, wempa@eden.rutgers.edu (Force Of Nature) writes:
  13. >Thanks to all who responded to my Character -> Integer Question.  The function
  14. >atoi() worked beautifully.  I have another question.  I need to take a pointer
  15. >to a string of characters and add ONLY 1 additional character to it.  I know
  16. >that I can simply go down until I find the '\0' and add the extra character
  17. >followed by the '\0'.  Is there an easier way to do this ??  I tried simply
  18. >doing:
  19. >                        *temp = *text + ')';
  20. >
  21. >This did not work.  Is there some other simple way to add characters onto the
  22. >end of a string ???
  23. >
  24. >-- 
  25. >--------------------------------------------------------------------
  26. >Kristofer Wempa                             
  27. >wempa@eden.rutgers.edu               http://remus.rutgers.edu/~wempa   
  28. >-------------------Be Young, Have Fun, Skydive !--------------------
  29.  
  30.  
  31. Try strcat(text, ")");
  32.  
  33.             Fletcher.Glenn@ov.com
  34.  
  35.  
  36.  
  37.